set unstable
raylib_platform:='rgfw'
default:
    @echo "{{GREEN}}success{{NORMAL}}"
@raylib force='':
    echo 'check raylib: \c'
    {{ if path_exists("target/raylib/libraylib.dylib") == 'true' { if force == '' {"echo "+GREEN+"'exists'"+NORMAL}else{ 'just _raylib'} }else{"just _raylib"} }}
@_raylib:  
    cd raylib && zig build -Dshared=true -Dplatform="{{raylib_platform}}" && zig build -Dplatform="{{raylib_platform}}"
    mkdir -p target/raylib
    cp raylib/zig-out/lib/libraylib.dylib target/raylib/
    echo "{{GREEN}}build success{{NORMAL}}"
build: raylib
    cjpm build